import request from "@/utils/request";

// 列表
export function contractListApi(data) {
    return request({
        url: "/system/contract/list",
        method: "get",
        params: data,
    });
}

// 点此关联查询
export function approvalLists(data) {
    return request({
        url: "/project/transfer/listss",
        method: "get",
        params: data,
    });
}

// 新增合同
export function addContractApi(data) {
    return request({
        url: "/system/contract",
        method: "post",
        data,
    });
}


// 合同详情
export function contractDetail(contractId) {
    return request({
        url: "/system/contract/" + contractId,
        method: "get",
    });
}


// 编辑
export function updateContractApi(data) {
    return request({
        url: '/system/contract',
        method: 'put',
        data
    })
}


// 删除
export function contractDeleteApi(data) {
    return request({
        url: '/system/contract/' + data,
        method: 'delete',
    })
}

// 撤回
export function withdrawApi(data){
    return request({
      url:"/system/contract/withDraw/" + data,
      method:"delete",
    })
  }


//   合同上传附件功能
export function  uploadAttachments(data){
    return request({
        url:"/system/contract/addFile",
        method:"post",
        data
    })
}





